package com.yc;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * @author zwei
 * @create 2024-08-09 19:54
 */
@Component
public class MyMessageListener {

    @JmsListener(destination = "myQueue1") // 监听myQueue消息队列
    public void receiveMessage(String message) {
        System.out.println("用户接收到的消息: " + message);
    }
}
